﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using MySql.Data.MySqlClient;
using System.Data;

namespace ProjectBuilder
{
    [DbTable("phpdoc_param")]
    public class Param : BaseDocObject
    {
        [DbField("method_id")]
        public long? MethodId { get; set; }

        [DbField("name")]
        public string Name { get; set; }

        [DbField("type", IsUniqField = false)]
        public string Type { get; set; }

        [DbField("is_ref", IsUniqField = false)]
        public int isRef { get; set; }

        [DbField("value", IsUniqField = false)]
        public string Value { get; set; }

        public Param(ProjectBuilder.PhpDocTypes.Param param, long? methodId)
        {
            MethodId = methodId;
            Name = param.Name;
            Type = param.Type;
            Value = param.Value;
        }

        public void Save()
        {
            GetDBId();
        }
    }
}